package com.zhousc.springcloud;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
public class FeignConsumerApplication {

    /**
     * 针对包名不一样的情况，可以重写FeignClient注解，自定义里面的属性
     * 注意G版不支持两个IService的FeignClient：需要配置spring.main.allow-bean-definition-overriding = ture
     */
//    @FeignClient
//    public interface Myservice extends IService{
//
//    }

    public static void main(String[] args) {
        new SpringApplicationBuilder(FeignConsumerApplication.class).web(WebApplicationType.SERVLET)
                .run(args);
    }
}
